<template>
  <div>
    <el-select v-model="result" class="select" @change="saveSelect">
      <el-option
              v-for="item in options"
              :key="item.label"
              :label="item.label"
              :value="item.label">
      </el-option>
    </el-select>
  </div>
</template>

<script>
  export default {
    name: "childCpn",
    props:{
      question_key : String,
      options : Array,
      value:''
    },
    data(){
      return{
        result:this.value
      }
    },
    watch:{
      value : function (val) {
        this.result = val
      }
    },
    methods:{
      saveSelect(){
        this.$emit('saveSelect',[this.question_key,this.result])
      }
    }
  }
</script>

<style scoped>
  /deep/.el-input__inner{
    border: 1px solid white !important;
    width: 540px !important;
    color: #898787;
    font-size: 18px;
    padding-left: 0;
  }
  /deep/.el-input__suffix{
    display: none !important
  }
</style>